package com.tuyrt.firstcode

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.tuyrt.firstcode.module.data.User

/**
 * Created by tuyrt7 on 2021/4/13.
 */
object MainRepository {

    fun getUser(userId: String): LiveData<User> {
        val userData = MutableLiveData<User>()
        //请求...
        userData.value =  User(userId, 18)
        return userData
    }

    fun refresh(): LiveData<Any?> {
        val refresh = MutableLiveData<Any?>()
        // ...操作
        return refresh
    }
}